<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11">
         <%-- <link rel="stylesheet" href="<%=basePath%>style/common.css"> --%>
        <link rel="stylesheet" href="<%=basePath%>style/cssreset.css">
        
        <link rel="stylesheet" href="<%=basePath%>style/pagination.css">
        <link rel="stylesheet" href="<%=basePath%>style/style.css">
        <link rel="stylesheet" href="<%=basePath%>style/style2.css"> 
        <link rel="stylesheet" href="<%=basePath%>css/mycss.css">
          <link rel="stylesheet" href="<%=basePath%>css/mystyle.css"> 
        <script src="<%=basePath%>js/jquery.min.js"></script>
        <script src="<%=basePath%>js/jquery.pagination.js"></script>
           <%--  <script src="<%=basePath%>salejihui/My97DatePicker/WdatePicker.js"></script> --%>
            <style type="text/css">

			     .bianji1{
				width: 552px;
				height: 369px;
				border:1px solid #ccc;
				border-radius:5px;
				position:absolute;
				top:110px;
				left:50%;
				margin-left:-260px;
				background:#fff;
				display:none;
				z-index:1;
			}
			.bianji1>p{
				width:100%;
				line-height:42px;
				text-indent:2em;
				color:#818181;
				border-bottom:1px solid #dddddd;
			}
			.bianji1>p>img{
				cursor:pointer;
				position:relative;
				left:426px;
				width:42px;
			}
			.bianji1>form>p{
				text-align:center;
				margin-bottom:21px;
				color:#555555;
				overflow:hidden;
			}
			.bianji1>form>p>span:nth-of-type(2){
				color:red;
				margin-left:10px;
			}
			
			.bianji1>form>p:nth-of-type(1){
				margin-top:19px;
				
			}
			.bianji1>form>p>input{
				float:none;
				width:300px;
				height:28px;
				text-align:left;
				margin-left:50px;
				outline:none;
				border:1px solid #ccc;
				border-radius:5px;
			}
			
			.bianji1>form>p:nth-of-type(7){
				width:100%;
				height:32px;
				background:#dfe4ea;
				padding:10px 0;
			}
			.bianji1>form>p:nth-of-type(7)>input{
				width: 56px;
				line-height: 28px;
				background:#57c049;
				border:none;
				border-radius:5px;
				color:#fff;
				position:relative;
				left:160px;
				cursor:pointer;
				text-align:center;
			}
			.bianji1>form>p:nth-of-type(7)>input:nth-of-type(1){
				left:190px;
				background:#ccc;
			}
			.smallsa{
				width:100%;
				height:1062px;
				position:absolute;
				top:0px;
				left:0px;
				background:rgba(0,0,0,0.2);
				display:none;
			}
			.tab{
				border-top:1px solid #1fd4fb;
				width:100%;
			}
			.thed{
				background:#ecf6f8;
			}
			.tbodys{
				background:#fff;
				font-size:14px;
			}
			td{
				padding:10px 15px;
				text-align:center;
				color:#555;
			}
			th{
				width: 100%;
			    height: 45px;
			    line-height: 45px;
			    background: #2f4050;
			    border-radius: 5px;
			    color: #fff;
			    font-size: 18px;
			    text-align: center;
			    margin-top: 0px;
			    position: relative;
			}
			.covers{
				background:#fff;
				width:100%;
				height:100%;
			}
			#cover3{
				display: none;
			    position: fixed;
			    z-index: 5;
			    top: 50%;
			    left: 50%;
			    margin-left:-334px;
			    margin-top:-229px;
			}
			input{
			float:none;
			}
		  </style>
        <script>
        	
            $(function(){
            	


			    $(".mores").click(function(e){
			    	$('body').css("overflow","hidden");
			        e.preventDefault();
			        $("#cover3").css("display","block");
			        
			    });
			    $(".close").click(function(){
			    	$('body').css("overflow","scroll")
			        $("#cover3").removeAttr("style");
			        $("#cover-content2").removeAttr("style");
			    });
                
                $('.sh2').mouseover(function(event) {
                    $('.showhide2').css('display', 'block');
                });
                $('.sh2').mouseout(function(event) {
                    $('.showhide2').css('display', 'none');
                });
               
                
            })
        </script> 
       
    </head>
    <body>
      <c:if test="${show!=null}">
      <script type="text/javascript">
      window.onload=function(){  
    	     alert("${show}");
    	} 
      </script>
      </c:if>
    	<div class="bigbox xlbox">
    		<nav class="daohan">
                <ul>
                	<li class="sh1">
                        <a href="<%=basePath %>notice/findByAll.action"><p class="mline"><span class="smallicon" id="current1"></span><span class="navtxt">首页</span></p></a>  
                    </li>
                    <li>
                        <a href="<%=basePath %>client/qiangenzongcount.action?zhuizong=0"  ><p class="mline"><span class="smallicon" id="current11"></span><span class="navtxt"  >用户开发</span></p></a>
                    </li>
                    <li>
                        <a href="<%=basePath %>client/selectDepOrSta.action?start=1">
                            <p class="mline">
                                <span class="smallicon" id="ziji11"></span>
                                <span class="navtxt">代理开发</span>
                            </p>
                        </a>
                    </li>
                    <%-- <li class="sh2">
                        <a href="<%=basePath %>client/selectByStaffAnd.action?start=1"><p class="mline"><span class="smallicon one1"></span><span class="navtxt">客户资料</span><span class="ripic"></span></p></a>
                        <div class="showhide2">
                            <a href="<%=basePath %>client/selectByStaffAnd.action" style="font-size:14px;background:#435565;">
                             <p class="mline mline2">
                                <span class="smallicon" id="ziji3"></span>
                                <span class="navtxt" style="font-size: 14px;color:#929da8;">用户资料</span>
                             </p>
                             </a> 

                             <a href="<%=basePath %>client/selectByStaffAnd.action?start=1" style="font-size:14px;margin-top:-22px;background:#435565;">
                             <p class="mline mline2">
                                <span class="smallicon" id="ziji34"></span>
                                <span class="navtxt" id="current2" style="font-size: 14px;color:#929da8;">代理资料</span>
                             </p>
                             </a>    
                        </div>
                    </li> --%>
                    <li>
                        <a href="<%=basePath %>approve/count.action?pageSize=0" id="sline"><p class="mline"><span class="smallicon" id="ziji8"></span><span class="navtxt" id="current2">合同审批</span></p></a> 
                    </li>
                    <li>
                         <a href="<%=basePath%>page/pacts.jsp">
                             <p class="mline"><span class="smallicon one222"></span><span class="navtxt">审批详情</span></p>
                         </a>
                        
                    </li>
                    
                     <li>
                        <a href="<%=basePath %>Operate/count.action">
                             <p class="mline"><span class="smallicon" id="yunyin2"></span><span class="navtxt">运营管理</span></p>
                         </a>
                    </li>  
                    
                   <li>
                        <a href="#"><p class="mline"><span class="smallicon one3"></span><span class="navtxt">产品资源库</span></p></a>
                    </li>
                   <c:if test="${backstage == 1}">
                    	<li>
	                        <a href="<%=basePath %>client/findByAllGr.action"><p class="mline"><span class="smallicon one333"></span><span class="navtxt">后台管理</span></p></a>
	                    </li>
                    </c:if>
                </ul>
            </nav>
            
    		<div class="showbox">
                <h2>合 同 审 核
                	<span class="exit">
					<span class="ex1">姓名:${staff.staff_name}</span>
					<a href="../login/tuichustaff.action" class="ex2"><span class="exicon2"></span>切换账号</a>
					<a href="../login/tuichustaff.action" class="ex3"><span class="exicon3"></span>退出账号</a>
				</span>
                </h2>
                <div class="showbox2">
	    		
	    			<div class="aaa">
		    			<div class="smalltitle">
							<a href="<%=basePath%>approve/count.action?pageSize=0" class="light3" style="width:70px;top:6px;margin-left:15px;">未处理</a>
							<a href="<%=basePath%>approve/count.action?pageSize=1" style="width:70px;top:6px;margin-left:12px;">已处理</a>
							<a href="<%=basePath%>pages/audits.jsp" style="width:150px;top:6px;margin-left:12px;"><span class="imgmove imgmove2" style="top:2px;"><img src="../images/newshenpi.png" alt=""></span>&nbsp;&nbsp;新建审核表</a>
							<form action="<%=basePath%>audits/count.action?pageSize=0" method="post" style="float:right;margin-right:238px;"  onsubmit="return tims()">
								<input type="text" name="condition" value="${condition}" id="times" placeholder="申请名称" style="width:200px;height:38px;border:1px solid #ccc;border-radius:5px;position:relative;top:6px;color:#ccc;font-family:'微软雅黑'">
								<input type="submit" value="搜索" style="width:60px;height:38px;position:relative;top:6px;border:none;text-align:center;border-radius:5px;margin-left:10px;cursor:pointer;background:#1fd4fb;color:#fff;">
							</form>
		 					<p class="yezi" style="right: 55px;">
								<a href="<%=basePath%>audits/count.action" style="width:155px;"><span class="imgmove imgmove2"><img src="../images/inshenpi.png" alt=""></span>&nbsp;&nbsp;进入审核</a>
							 </p> 
		    			</div>
	    				<ol class="htnav">
							<li><a href="<%=basePath%>approve/count.action?pageSize=0">开户审批</a></li>	 
							<li class="changebg"><a href="<%=basePath%>audits/count.action?pageSize=0" style="color:#fff;">合同审核</a></li>	 
	    				</ol>
	    				<div class="apprcontent">
	    					  <table class="tab">
    								<thead class="thed">
    									<tr>
    										<td>编码</td>
    										<td>申请名称</td>
    										<td>负责人</td>
    										<td>申请类型</td>
    										<td>产品类别</td>
    										<td>承担百分比</td>
    										<td>审批人</td>
    										<td>审批状态</td>
    										
    									</tr>
    								</thead>
    								<tbody class="tbodys">
    								</tbody>
    							</table> 					   							
    					</div>			
    				</div>
	    		<div class="M-box" style="margin-left:35%"></div>
	    		</div>
	    			
					 <!-- <div id="cover3">
                        <div id="cover-bg3"></div>
                        <form action="" id="cover-content2">
                            <h4>合 同 审 核 详 情<span class="close"></span></h4>
                            <p class="main" style="margin-top:50px;">
                                <span class="leftmain">申 请 单 位</span>
                                <input type="text" class="shurukuang" id="applicant">
                            </p>
                            <p class="main">
                                <span class="leftmain">生 效 时 间</span>
                                <input type="text" id="effectTimeStart"  class="shurukuang" style="width:100px;"><span>至</span><input type="text" id="effectTimeFinish"  class="shurukuang" style="width:100px;">
                            </p>
                            <p class="main">
                                <span class="leftmain">申 请 类 型</span>
                                <input type="text" id="auditType"  class="shurukuang">
                            </p>
                            <p class="main">
                                <span class="leftmain">承担百分比</span>
                                <input type="text" id="assumePercentage"  class="shurukuang">
                            </p>
                            <p class="main">
                                <span class="leftmain">保 证 金&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                <input type="text" id="deposit" class="shurukuang">
                            </p>
                            <p class="main">
                                <span class="leftmain">保证金模式</span>
                                <input type="text" id="depositPattern" class="shurukuang">
                            </p>
                            <p class="main">
                                <span class="leftmain">提 交 时 间</span>
                                <input type="text" id="submitTime"  class="shurukuang">
                            </p>
                            <p class="main">
                                <span class="leftmain">审 批 类 型</span>
                                <input type="text" id="approveTailId"  class="shurukuang">
                            </p>
                            <p class="main">
								<span class="leftmain">产 品 类 别</span>
								<input type="text"  class="pCategory"  id="pCategory" style="width:255px;">
							</p>
							<p class="main">
								<span class="leftmain">负 责 人</span>
								<input type="text"  class="rPerson"  id="rPerson" style="width:255px;">
							</p>
                            <p class="main">
                                <span class="leftmain">审 核 状 态</span>
                                <input type="text" id="approvalState"  class="shurukuang">
                            </p>
                            <p class="main" style="height:100px;">
                                <span class="leftmain" style="position:absolute;">其 他 说 明</span>
                                <textarea name="" id="remarks" class="shurukuang" style="height:100px;margin-left: 31%;"></textarea>
                            </p>
                        </form>
                     </div> -->
					<table id="cover3">
						
						<tr class="trs"><th colspan="4">合 同 审 核 详 情<span class="close"></span></th></tr>
						<tbody class="covers">
							<tr class="main">
								<td>申 请 单 位</td>
								<td><input type="text" class="shurukuang" id="applicant"  disabled="disabled"></td>
								<td>生 效 时 间</td>
								<td><input type="text" id="effectTimeStart"  class="shurukuang" style="width:95px;" disabled="disabled"><span style="position:relative;">至</span><input type="text" id="effectTimeFinish"  class="shurukuang" style="width:95px;" disabled="disabled"></td>
							</tr>
							<tr class="main">
								<td>申 请 类 型</td>
								<td><input type="text" id="auditType"  class="shurukuang" disabled="disabled"></td>
								<td>承担百分比</td>
								<td><input type="text" id="assumePercentage"  class="shurukuang" disabled="disabled"></td>
							</tr>
							<tr class="main">
								<td>保 证 金</td>
								<td><input type="text" id="deposit" class="shurukuang" disabled="disabled"></td>
								<td>保证金模式</td>
								<td><input type="text" id="depositPattern" class="shurukuang" disabled="disabled"></td>
							</tr>
							
							<tr class="main">
								<td>产 品 类 别</td>
								<td><input type="text"  id="pCategory" class="shurukuang" disabled="disabled"></td>
								<td>负 责 人</td>
								<td><input type="text" id="rPerson" class="shurukuang" disabled="disabled"></td>
							</tr>
							<tr class="main">
								<td>审 核 状 态</td>
								<td><input type="text" id="approvalState"  class="shurukuang" disabled="disabled"></td>
								<td>签约时间</td>
								<td><input type="text" class="shurukuang" id="signTime" disabled="disabled"></td>
								
							</tr>
							<tr class="main">
								
								<td>审 批 类 型</td>
								<td><input type="text" id="approveTailId"  class="shurukuang" disabled="disabled"></td>
								<td>其 他 说 明</td>
								<td><textarea name="" id="remarks" class="shurukuang" style="height:100px;" disabled="disabled"></textarea></td>
							</tr>
						</tbody>
					</table>
	    		</div>
	    	
	    	 
    	</div>
        <div class="bianji1">
	    		<p>信息修改<img src="images/guanbi.png" alt="" class="gb"></p>
	    		<form action="javascript:updateguanli()" method="post" onsubmit="return textas()">
	    			<input type="hidden" disabled="disabled" id="staffId" value="${staff.staff_id}">
	    			<p><span style="margin-right:43px;">姓 名</span><input type="text" disabled="disabled" id="xingming" value="${staff.staff_name}"></p>
	    			<p><span style="margin-right:28px;">手 机 号</span><input type="text" id="shoujihao" value="${staff.staff_phone}"><span>*</span></p>
	    			 <p><span style="margin-right:28px;">旧 密 码</span><input type="hidden" id="mimajiu" value="${staff.staff_password}"><input type="text" name="password" id="mimatian" value=""><span>*</span></p> 
	    			<p><span style="margin-right:28px;">新 密 码</span><input type="password" name="password" class="newpass" id="mima" value=""><span>*</span></p>
	    			<p><span style="margin-right:10px;">确 认密 码</span><input type="password" name="password" class="newspass" id="" value=""><span>*</span></p>
	    			<p><span style="margin-right:19px;">邮 箱 号</span><input type="text" id="youxiang" value="${staff.staff_email}"><span>*</span></p>
	    			<p><input type="button" value="取消" class="qi"><input type="submit" value="确定"></p>
	    		</form>
	    	</div>
    		<div class="smallsa"></div>
        <script type="text/javascript">
        function textas(){
	    	var shoujihao=$("#shoujihao").val();
	    	var mima=$("#mimatian").val();
	    	var newpass=$(".newpass").val();
	    	var newspass=$(".newspass").val();
	    	var p=/\s/;
	    	var mimajiu=$("#mimajiu").val();
	    	if(shoujihao==""||p.test(shoujihao)){
	    		alert("请填写手机号！");
	    		return false;
	    	}else if(mima!=mimajiu){
	    		alert("输入的密码不一致！");
	    		return false;
	    	}else if(newpass==mima){
	    		alert("输入的密码不能与旧密码一致！");
	    		return false;
	    	}else if(newpass==""||p.test(newpass)){
	    		alert("请输入新密码！");
	    		return false;
	    	}else if(newspass==""||p.test(newspass)){
	    		alert("请再次输入新密码！");
	    		return false;
	    	}else if(newspass!=newpass){
	    		alert("与重新设置的密码不相同，请重新输入！");
	    		return false;
	    	}
	    	return true;
	    }
        $('.ex1').click(function(){
	    	$('.bianji1').css('display','block');
	    	$('.smallsa').css('display','block');
	    })
	    $('.gb').click(function(){
	    	$('.bianji1').css('display','none');
	    	$('.smallsa').css('display','none');
	    })
	     $('.qi').click(function(){
	    	$('.bianji1').css('display','none');
	    	$('.smallsa').css('display','none');
	    })
      
        function tims(){	    	
	    	var val=true;
	    	if($("#times").val()==""){	    	
	    		alert("请输入申请人姓名!");
	    		return false;
	    	}
	    	return val;
	    }
            $('.M-box').pagination({
            pageCount: ${PageCount},//总页数
			current: ${PageNum},//当前页码
            callback:function(api){
                var pageNum=api.getCurrent();
			    var condition="${condition}";
                $.ajax({  
                    type : "POST",  
                    url : "<%=basePath%>audits/pageFindnoapprove.action",//路径  
                    data : {  
                        pageNum : api.getCurrent(),
		            	"condition" : condition
                    },
                    success : function(data) {
                        var number=data[0].number;//总页数
                        api.setPageCount(number);//动态修改总页数为20页
                        var pageNum=data[0].pageNum;
                        var text="";
                        $('.tras').remove();
                      for(var i=0;i<data[0].list.length;i++){
                           
                        text=$('<tr class="tras"><td class="mores" onclick="dian('+data[0].list[i].approveId+')" style="cursor:pointer">'+data[0].list[i].approveId+'</td><td>'+data[0].list[i].applicant+'</td><td>'+data[0].list[i].rPerson+'</td><td>'+data[0].list[i].auditType+'</td>'
								+'<td>'+data[0].list[i].pCategory+'</td><td>'+data[0].list[i].assumePercentage+'</td><td>'+data[0].list[i].Approvers+'</td><td>'+data[0].list[i].approvalState+'</td></tr>');
                            $('.tbodys').append(text);
                          }
                      $(".tras:odd").css("background",'#f8f8f8');
                    }
                });  
            }
        },function(api){
            var pageNum;
		    var condition="${condition}";
            $.ajax({  
                type : "POST",  
                url : "<%=basePath%>audits/pageFindnoapprove.action",//路径  
                data : {  
                    pageNum : api.getCurrent(),
	            	"condition" : condition
                },
                success : function(data) {
                            
                    var number=data[0].number;//总页数
                    api.setPageCount(number);//动态修改总页数为20页
                    var pageNum=data[0].pageNum;
                    var text="";  
                    for(var i=0;i<data[0].list.length;i++){
                    	show=data[0].list[i].approveId;
                    	text=$('<tr class="tras"><td class="mores" onclick="dian('+data[0].list[i].approveId+')" style="cursor:pointer">'+data[0].list[i].approveId+'</td><td>'+data[0].list[i].applicant+'</td><td>'+data[0].list[i].rPerson+'</td><td>'+data[0].list[i].auditType+'</td>'
								+'<td>'+data[0].list[i].pCategory+'</td><td>'+data[0].list[i].assumePercentage+'</td><td>'+data[0].list[i].Approvers+'</td><td>'+data[0].list[i].approvalState+'</td></tr>');
                            $('.tbodys').append(text);
                          }
                    $(".tras:odd").css("background",'#f8f8f8');
                }
            }); 
            
        });
            function dian(show){
            	$(".smallsa").css("display","block");
            	$('body').css("overflow","hidden");
                 $.ajax({
                     url: '<%=basePath %>audits/findContract.action',
                     type: 'post',
                     data: {approveId: show},
                     success:function(data){
                          $('#applicant').val(data[0].Applicant);//申 请 单 位
                          $('#effectTimeStart').val(data[0].effectTimeStart);//
                          $('#effectTimeFinish').val(data[0].effectTimeFinish);//--
                          $('#auditType').val(data[0].auditType);//申 请 类 型
                          $('#assumePercentage').val(data[0].assumePercentage);//承 担 百 分 比
                          $('#deposit').val(data[0].deposit);//保 证 金
                          $('#depositPattern').val(data[0].depositPattern);//保 证 金  模 式
                          $('#submitTime').val(data[0].submitTime);//提 交 时 间
                          $('#approveTailId').val(data[0].approveTailId);//审 批 类 型
                          $('#approvalState').val(data[0].approvalState);//审 核 状 态
                          $('#pCategory').val(data[0].pCategory);//产品类别
                     	  $('#rPerson').val(data[0].rPerson);//负责人
                          document.getElementById("remarks").innerText=data[0].remarksremarks;//其 他 说 明     
                          $('#signTime').val(data[0].signTime);//签约时间
                     }
                 })

                 $("#cover3").css("display","block");
                 $(".close").click(function(){
                    $('body').css("overflow","scroll");
                    $('body').css('overflow-x','hidden');
                    $("#cover3").removeAttr("style");
                    $("#cover-content2").removeAttr("style");
                    $(".smallsa").css("display","none");
                });
             }
        </script>   
        <script>
           
        </script>  
    </body>
</html>
